The present invention relates, in a video decoder provided with a buffer for receiving pictures to be decoded, to a method of switching, before decoding, from a first coded picture sequence at a bit rate Rold to a second one at a lower bitrate Rnew and to a corresponding device for implementing said switching method.
As described for instance in the document xe2x80x9cMPEG video coding: a basic tutorial introductionxe2x80x9d, BBC report RD 1996/3, an MPEG-type compressed video sequence is subdivided into groups of pictures (or GOPs), that themselves include different types of coded pictures (an example of GOP is described in FIG. 1):
intra-coded pictures (I-pictures), that are coded without any reference to other pictures;
predictive-coded pictures (P-pictures), that are coded using prediction from a past reference;
bidirectionally predictive-coded pictures (B-pictures), that are coded using prediction from past and/or future reference(s) (the arrows indicate for each P-picture or B-picture the respective reference picture(s)).
According to the different types of prediction, pictures are coded with more or less efficiency, and the resulting number of bits is not constant. Moreover, as a picture is assumed, according to the MPEG specifications, to be instantaneously decoded every picture period Tv, the first bit of the coded pictures does not spend the same time in the decoder""s buffer: this variable time, defined in the MPEG syntax, is called the vbv_delay (vbv=video buffering verifier). An example of decoder""s buffer fullness for a stream coded at a constant bit rate and where a picture is instantaneously decoded every picture period Tv is shown in FIG. 2 (decoder""s buffer fullness S(t) versus time t) for successive pictures I0 to I4 with respective vbv_delays vbv(I0), vbv(I1), . . . , vbv(I4), . . . , etc. The bit rate for a picture is given by the slope, and the fullness (or decoder""s buffer state) is given by the highest point for each period Tv. According to FIG. 3, the size d(Ij) of a picture Ij decoded at the time td(Ij) when Ij is removed from the decoder buffer is equal to:
d(Ij)=Sxe2x88x92(Ij)xe2x88x92S+(Ij)xe2x80x83xe2x80x83(1)
with Sxe2x88x92(Ij) and S+(Ij) designating respectively the decoder""s buffer state at time tdxe2x88x92(Ij) (=the time just before the picture Ij is removed from decoder""s buffer) and at time td+(Ij) (=the time just after the picture Ij is removed from decoder""s buffer). For this picture Ij, the relation between its vbv_delay vbv(Ij), the bit rate R of the video stream and the decoder""s buffer state Sxe2x88x92(Ij) is given by:
Sxe2x88x92(Ij)=vbv(Ij).Rxe2x80x83xe2x80x83(2)
One has also:
S+(Ij)=Sxe2x88x92(Ij+1)xe2x88x92R.Tvxe2x80x83xe2x80x83(3)
From relations (2), (1), (3), it can be deduced a more precise relation giving (in bits)the size d(Ij) of the decoded picture Ij:
d(Ij)=R.(vbv(Ij)xe2x88x92vbv(Ij+1)+Tv)xe2x80x83xe2x80x83(4)
Due to this regulation model, a simple switch between two compressed (coded) video sequences is not always possible: performing a switch with a picture decoded at every period Tv is not possible when the vbv_delay of the first new picture that is transmitted is greater than the vbv delay of the first old picture that is replaced. This situation is illustrated in FIG. 4 it is not possible to replace the picture O3 of the old sequence (O1, O2, O3) by the picture N1 of the new sequence (N1, N2), since the vbv_delay vbv(N1) of N1 is greater than the vbv_delay vbv(O3) of O3.
It is known, in MPEG-2 standard (such as described for instance in the european patent application EP 0692911), that video switching is then facilitated by the use of special access points called xe2x80x9csplicing pointsxe2x80x9d: it can be performed only if same splicing points are present on both old and new video sequences.
It is an object of the invention to propose a method that allows video sequence switching without the constraints of splicing point creation.
To this end the invention relates to a method such as described in the preamble of the description and which is moreover characterized in that, if the period vbv(N1) that the first bit of the first transmitted picture (N1) of the second sequence would have to spend in the decoder""s buffer before the decoding time of said first transmitted picture is greater than the similar period vbv(O3) that the first bit of the first replaced picture (O3) of the first sequence would have to spend in said buffer before its own decoding time, then the bitrate of said first transmitted picture of the second sequence is increased, at least up to the value Rint for which said period vbv(N1) is correspondingly reduced to a value at most equal to the period vbv(O3).
Switch can now be performed without any splicing point. According to the present invention, the bit rate is locally increased in such a manner that vbv_delays of the first old picture that is replaced and the first new picture that is transmitted are now compatible, and therefore that a splicing point is no longer needed in order to implement the switching operation.
However, it is not always possible to increase the bitrate indefinitely to reach a suitable vbv_delay value: for instance, the video sequences may be multiplexed with other elementary streams to form a multiplex transport stream, and the method described hereabove may be limited, in that case, by the available bandwidth in said multiplex transport stream.
According to the invention, the above-described method is then improved in that, in case of a limited bandwidth for the bitrates:
(a) the bit rate of said first transmitted picture N1 is increased up to the lower of the two following values: the maximum bit rate value corresponding to said limited bandwidth, or the value Rint for which said period vbv(N1) is correspondingly reduced to a value at most equal to the period vbv(O3);
(b) the operation (a) is repeated for the second picture N2 of the second sequence, only if said lower value is the maximum bit rate value corresponding to said limited bandwidth;
(c) the operation (a) is similarly repeated for the following pictures N3, N4, . . . , of the second sequence, only if said lower value at the end of the previous operation is said maximum bit rate value.
When there is a bandwidth limitation for the bit rate increase, the proposed method is improved by increasing successively the bit rates for as many pictures of the second sequence as necessary, in a way to reduce as much as possible the vbv_delay of the first picture in spite of the constraint due to said bandwidth limitation.